package engine.logic
{
	import engine.net.messages.CustomToServerFlag;
	import engine.net.mgr.SystemSender;
	import engine.newUi.SitAlerLogic;
	import engine.ui.lite.BaseUI;
	
	import flash.events.MouseEvent;
	
	import newx.com.config.StaticIni;

	public class ClearCDTimeLogic
	{
		private var clearCDTypeObj:Object
		private static var _self:ClearCDTimeLogic;
		private var _cdID:int
		public function ClearCDTimeLogic()
		{
			init()
		}
		public static function getInstance():ClearCDTimeLogic
		{
			if(_self	==	null)
			{
				_self	=	new ClearCDTimeLogic();
			}
			return _self;
		}
		private function init():void
		{
			clearCDTypeObj	=	{};
		}
		/**
		 * 清除冷却时间
		 * @param cdID
		 * @param infoStr
		 * @param needNum
		 * @return 
		 * 
		 */		
		public function clearCDTime(cdID:int,infoStr:String,needNum:int):void
		{
			_cdID	=	cdID;
			SitAlerLogic.getIntatic().setUIinfo(infoStr,[needNum],clickBtnHandle,cdID);
		}
		/**
		 * 确认后的回调 
		 * @return 
		 * 
		 */		
		private function clickBtnHandle():void
		{
			if(_cdID == 9999999)
			{
				SystemSender.getInstance().CustomMsg(CustomToServerFlag.CLIENT_CUSTOMMSG_ADD_CLONE_PLAYER_COUNT);
			}
			else
			{
				SystemSender.getInstance().CustomMsg(CustomToServerFlag.CLEINT_CUSTOMMSG_REQUEST_CLEAR_CD,_cdID);
			}
		}
	}
}